using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using NTTHAO.Web.BL.HighlightLink;
using System.Collections.Generic;

public partial class admin_webparts_Plug_ins_HighlightLink_LinkList : System.Web.UI.UserControl
{
    public HighlightLinkGroup _Group = null;
    public List<HighlightLink> _List = null;

    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                int groupID = 0;
                Int32.TryParse(Request.QueryString["id"], out groupID);
                _Group = HighlightLinkGroup.GetItem(groupID);

                if (_Group == null)
                {
                    string redirectURL = "?type=" + Request.QueryString["type"] + "&name=" + Request.QueryString["name"];
                    Response.Redirect(redirectURL, false);
                    return;
                }

                _List = _Group.Links;
            }
        }
        catch (Exception ex)
        {
            Response.Write(ex.Message + "<br /><br />" + ex.StackTrace + "<br /><br />" + ex.Source);
        }
    }
}
